package com.aopeng.mapper;

import com.aopeng.entity.AopengExamination;
import com.aopeng.entity.AopengUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
* @Description: 用户类持久层
* @Author: 谢辉
* @CreateDate: 2020/7/10 20:46
*/
@Repository //代表持久层
public interface AopengUserMapper extends BaseMapper<AopengUser> {

    //自定义登录方法
    @Select("select * from aopeng_user where username = #{username} and login_password = #{loginPassword}")
    AopengUser findUsernameByLoginPassword(String username, String loginPassword);

    @Select("select * from aopeng_user where email = #{email}")
    AopengUser findUserByEmail(String email);
}
